package com.check.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.check.dao.MarkRoleDao;
import com.check.pojo.MarkRole;
import com.check.pojo.MarkWorkRole;

@Repository("markRoleDao")
public class MarkRoleDaoImpl  extends BaseSqlMapDao implements MarkRoleDao{

	public List<MarkRole> findAllMarkRole(Map map) {
		return getSqlMapClientTemplate().queryForList("MarkRole.findAllWorkRoleByPage",map);
	}

	public int findMarkRoleCount() {
		return Integer.parseInt(findObject("MarkRole.findMarkRoleCount").toString());
	}
	
	public void insertMarkRole(MarkRole markRole) throws Exception{
		 insertObject("MarkRole.insertMarkRole", markRole);
	}
	
	public void insertMarkWorkRole(MarkWorkRole markWorkRole) throws Exception{
		insertObject("MarkRole.insertMarkWorkRole",markWorkRole);
	}
	
	public MarkRole findMarkRoleById(String m_id) throws Exception {
		
		return (MarkRole) findObject("MarkRole.findByMarkRoleId", m_id);
	}

	public void deleteMarkRole(String m_id) throws Exception {
		deleteObject("MarkRole.deleteMarkRole", m_id);
	}

	public void deleteMarkWorkRole(String m_id) throws Exception {
		deleteObject("MarkRole.deleteMarkWorkRole", m_id);
	}

	public void updateMarkRole(MarkRole markRole) {
		updateObject("MarkRole.updateMarkRole", markRole);
	}


}
